from projectHelper import project
import widgets

modified: bool = False


def setModified(isModified: bool = True) -> None:
    global modified
    modified = isModified
    updateTitle()


def updateTitle() -> None:
    widgets.root.title(
        "LEmonaDe Player - "
        + (
            project.fileName
            if not project.fileName is None
            else project.projectName + "（未保存）"
        )
        + ("*" if modified else "")
    )
